package com.ruoyi.aiexperiments.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.aiexperiments.mapper.ExperimentTrainingMapper;
import com.ruoyi.aiexperiments.domain.ExperimentTraining;
import com.ruoyi.aiexperiments.service.IExperimentTrainingService;

/**
 * 实验训练记录Service业务层处理
 * 
 * @author czj
 * @date 2025-01-06
 */
@Service
public class ExperimentTrainingServiceImpl implements IExperimentTrainingService 
{
    @Autowired
    private ExperimentTrainingMapper experimentTrainingMapper;

    /**
     * 查询实验训练记录
     * 
     * @param trainingId 实验训练记录主键
     * @return 实验训练记录
     */
    @Override
    public ExperimentTraining selectExperimentTrainingByTrainingId(Long trainingId)
    {
        return experimentTrainingMapper.selectExperimentTrainingByTrainingId(trainingId);
    }

    /**
     * 查询实验训练记录列表
     * 
     * @param experimentTraining 实验训练记录
     * @return 实验训练记录
     */
    @Override
    public List<ExperimentTraining> selectExperimentTrainingList(ExperimentTraining experimentTraining)
    {
        return experimentTrainingMapper.selectExperimentTrainingList(experimentTraining);
    }

    /**
     * 新增实验训练记录
     * 
     * @param experimentTraining 实验训练记录
     * @return 结果
     */
    @Override
    public int insertExperimentTraining(ExperimentTraining experimentTraining)
    {
        return experimentTrainingMapper.insertExperimentTraining(experimentTraining);
    }

    /**
     * 修改实验训练记录
     * 
     * @param experimentTraining 实验训练记录
     * @return 结果
     */
    @Override
    public int updateExperimentTraining(ExperimentTraining experimentTraining)
    {
        return experimentTrainingMapper.updateExperimentTraining(experimentTraining);
    }

    /**
     * 批量删除实验训练记录
     * 
     * @param trainingIds 需要删除的实验训练记录主键
     * @return 结果
     */
    @Override
    public int deleteExperimentTrainingByTrainingIds(Long[] trainingIds)
    {
        return experimentTrainingMapper.deleteExperimentTrainingByTrainingIds(trainingIds);
    }

    /**
     * 删除实验训练记录信息
     * 
     * @param trainingId 实验训练记录主键
     * @return 结果
     */
    @Override
    public int deleteExperimentTrainingByTrainingId(Long trainingId)
    {
        return experimentTrainingMapper.deleteExperimentTrainingByTrainingId(trainingId);
    }
}
